<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class MY_Uploadproject {

	/**
	 * 
	 * @param unknown_type $filedestination 需要上传到哪个文件夹
	 * @param unknown_type $name html中文件上传域的名字
	 */
	
	public function __construct()
	{}	
	public function myupload($filedestination,$name)
	{	
			$config['allowed_types'] = 'gif|jpg|png|txt';
			$config['max_size'] = '100';
			$config['max_width'] = '1024';
			$config['max_height'] = '768';
			$config['upload_path'] = $filedestination;
			$CI =& get_instance(); 
			$CI->load->library('upload', $config);				
			$CI->upload->do_upload($name);			
	}
}
?>